# 在指定目录下寻找头文件和动态库文件的位置，可以指定多个目标路径
set(USER_DEFINE_MODULE_NAME "Mylib")

set(${USER_DEFINE_MODULE_NAME}-install "D:/mylib-install")

find_path(${USER_DEFINE_MODULE_NAME}_INCLUDE_DIR mylib.h "${${USER_DEFINE_MODULE_NAME}-install}/include")
find_library(${USER_DEFINE_MODULE_NAME}_LIBRARY NAMES ${USER_DEFINE_MODULE_NAME} PATHS "${${USER_DEFINE_MODULE_NAME}-install}/lib")

if (${USER_DEFINE_MODULE_NAME}_INCLUDE_DIR AND ${USER_DEFINE_MODULE_NAME}_LIBRARY)
    set(${USER_DEFINE_MODULE_NAME}_FOUND TRUE)
endif (${USER_DEFINE_MODULE_NAME}_INCLUDE_DIR AND ${USER_DEFINE_MODULE_NAME}_LIBRARY)